package com.group2.bankonline.mapper;

import com.group2.bankonline.pojo.Personinfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author syf
 * @since 2024-07-11
 */
public interface PersoninfoMapper extends BaseMapper<Personinfo> {
    public  Personinfo selectByTelAndPwd(@Param("tel") String tel, @Param("pwd") String pwd);

    public Personinfo selectByTel(@Param("tel") String tel);

    public Personinfo selectByRealname(@Param("realname") String realname);

    public int updateinfo(Personinfo personinfo);

    @Select("""
            select telephone from personinfo where id = #{id};
            """)
    public String selectTelById(@Param("id")int id);
}
